package com.adtech.core.dao;

import org.apache.log4j.Logger;

import com.adtech.core.exception.DatabaseException;

/**
 * DAO异常拦截器
 * 拦截DAO异常并将异常记录至系统日志，然后抛出系统异常通知给页面处理
 * @author  
 * @since 2011-11-29 
 * 
 * @Copyright (C) AD Tech Workshop All Right Reserved
 */

public class DAOExceptionHelper {
	private static final Logger log = Logger.getLogger(DAOExceptionHelper.class);
	
    public void afterThrowing(Exception e) throws DatabaseException
    {  
        log.error("execute method of BaseDAO error:", e);
        throw new DatabaseException(e);
    }  
	

}
